#ifndef _PING_H_
#define _PING_H_

#include "types.h"

#define ECHO_REQ 8
#define ECHO_REPLY 0

typedef struct
{
    uint8_t type;
    uint8_t code;
    uint16_t checksum;
    union {
       uint32_t value;
       struct {
           uint16_t id;
	   uint16_t seq_num;
       }ping;
    }quench;
    uint8_t data[320];
}__attribute__((__packed__))icmp_t;

void start_icmp(void);


#endif
